import * as types from './mutation-types'
import {post, handleCity} from '../../../common/js/utils'

export const getDictionaries = function ({commit, state}, name) {
  post('/service/sys/config/config/getConditionList', {
    tabStr: 'TAB_CITY'
  }).then(res => {
    let TAB_CITY = handleCity(res.result.TAB_CITY.children)
    commit(types.SET_DICTIONARIES, {
      TAB_CITY: TAB_CITY
    })
  })
}
